<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>传递参数</title>
</head>
<body>
<script>
    function demo(a,b) {
        var sum = a+b;
        alert(sum);
    }
    demo(20,40);
    demo(10,20);
</script>
<script>
    function demo02(name,age) {
        alert("hello "+name+",我的年龄是"+age);
    }
</script>
<button onclick="demo02('iwen',20)">按钮</button>
<button onclick="demo02('ime',15)">按钮</button>

</body>
</html>